import 'dart:convert';
import 'dart:io';

import 'package:cjybase/widget/cjy_listview.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';

import 'main_page_state.dart';

class MainPageView extends MainPageState {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: Text(
          "主界面",
        ),
      ),
      body: Container(
        alignment: Alignment.center,
        child: Column(
          crossAxisAlignment: CrossAxisAlignment.center,
          children: [
            TextButton(onPressed: list, child: Text("列表案例")),
            TextButton(onPressed: network, child: Text("网络请求案例")),
            TextButton(onPressed: oneDialog, child: Text("一个按钮的dialog案例")),
            TextButton(onPressed: twoDialog, child: Text("两个个按钮的dialog案例")),
            TextButton(onPressed: getPath, child: Text("获取APP免权限路径")),
            TextButton(onPressed: permission, child: Text("权限测试")),
            TextButton(onPressed: download, child: Text("获取权限，下载视频，保存到相册")),
          ],
        ),
      ),
    );
  }
}
